<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-content">
					<form class="form-horizontal m-t" id="signupForm">
						<input type="hidden" id="payType" th:value="${paymentCode.passagewayId}">
						<input type="hidden" id="code" th:value="${paymentCode.qrCode}">
						<div class="form-group" th:switch="${paymentCode.passagewayId}">
						<div class="col-sm-8" th:case="'1'">
							<img th:src="${paymentCode.qrCode}" width="80%" height="60%">
						</div>
						<div class="col-sm-8" th:case="'2'">
							<img th:src="${paymentCode.qrCode}" width="80%" height="60%">
						</div>
						<div class="col-sm-8" th:case="'4'">
							<input class="form-control" th:value = "${paymentCode.qrCode}" disabled="disabled">
						</div>
						<div class="col-sm-8" th:case="'3'">
							<input class="form-control" th:value = "${paymentCode.qrCode}" disabled="disabled">
						</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

</div>
<div th:include="include::footer"></div>
<script>
	$(document).ready(function () {
		var payType = $("#payType").val();
		if (payType=='1' || payType=='2') {
			//使用canvas生成
			$('#qrcode').qrcode({
				render: "canvas",
				text: $('#code').val()
			});
		}

	})
</script>
</body>
</html>
